package com.training.java.core.interfaces;

public abstract class SuperClassComputer implements Computer {

	private String make;
	private String model;
	private int screenSize;
	private boolean isConnected;
	private boolean isStarted;
	
	/**
	 * @param make
	 * @param model
	 * @param screenSize
	 * @param isConnected
	 * @param isStarted
	 */
	public SuperClassComputer(String make, String model, int screenSize,
			boolean isConnected, boolean isStarted) 
		{
		super();
		this.make = make;
		this.model = model;
		this.screenSize = screenSize;
		this.isConnected = isConnected;
		this.isStarted = isStarted;
	}

	public String getMake() {
		return make;
	}

	public String getModel() {
		return model;
	}

	public int getScreenSize() {
		return screenSize;
	}

	public boolean isConnected() {
		return isConnected;
	}

	public boolean isStarted() {
		return isStarted;
	}

	@Override
	public void showInfo() {

	}

	@Override
	public void switchOn() {
		
		isStarted=true;
        System.out.println("Switching on..."); 

	}

	@Override
	public void switchOff() {
		isStarted=false;
		System.out.println("Switching off...");

	}

	@Override
	public void connectWiFi() {
		
		if(!isConnected())
		{
		setConnected(true);
		System.out.println("Internet is connected.");
		}
	}

	private void setConnected(boolean isConnected) {
		this.isConnected = isConnected;
		
	}

}
